'use strict';

if (zxcv && !zxcv.Renderer) {
    zxcv.Renderer = function () {
        var self = this;
        this.effectStack = [];
        this.matrixStack = [];
    };
    
    zxcv.Renderer.prototype.push = function (matrix) {
        this.matrixStack.push(matrix);
        mat4.set(matrix, zxcv.raw.graphics.transforms[0]);
    };
    
    zxcv.Renderer.prototype.pop = function () {
        var stack = this.matrixStack;

        if (stack.length > 0)
            stack.pop();

        if (tm.stack.length > 0)
            mat4.set(stack[stack.length - 1], zxcv.raw.graphics.transforms[0]);
        else
            mat4.identity(zxcv.raw.graphics.transforms[0]);
    };

    zxcv.Renderer.pushEffect = function (effects) {
        var i, length;
        for (i = 0, length = effects.length; i < length; i++) {
        }
    };

    zxcv.Renderer.popEffect = function () {
        var stack = this.effectStack;

        if (stack.length > 0)
            stack.pop();
    };

    zxcv.Renderer.prototype.draw = function (texture, x, y, originX, originY, clippingRectangle) {
        zxcv.raw.graphics.draw(texture, x, y, originX, originY, clippingRectangle);
    };
}